<html>
<head><meta charset="utf-8"><title>Option::map_ref · t-libs · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/index.html">t-libs</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Option.3A.3Amap_ref.html">Option::map_ref</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="189923514"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Option%3A%3Amap_ref/near/189923514" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Thom Chiovoloni <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Option.3A.3Amap_ref.html#189923514">(Mar 06 2020 at 18:59)</a>:</h4>
<p>Any chance this (or something similar -- I'm very much not attached to the name) would be accepted as a shorthand for <code>opt.as_ref().map(...)</code>? This is an exceptionally common sequence of calls, often confuses new users who try to use map (admittedly, this wouldn't actually fix that use case), and the additional call feels like mostly noise to me. Sorry if this has been discussed before.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>